<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="description" content="BoNiu Admin - UI Elements" />
	<meta name="author" content="tangzk@yeah.net" />
	<title>BoNiu Admin | UI Elements - Dialog</title>
	<link rel="stylesheet" href="assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="assets/css/entypo.css">
	<link rel="stylesheet" href="assets/css/font.css">
	<link rel="stylesheet" href="assets/css/common.css">
	<link rel="stylesheet" href="assets/css/page_base.css">
	<script src="assets/js/libs/jquery-1.12.0.min.js"></script>
	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
		<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
</head>
<body>
	<div class="page-container">
		<div class="page-example">
			<button type="button" class="btn btn-primary" onclick="showConfirm()">
				确认对话框
			</button>
			<script>
				var showConfirm = function() {
					boNiu.Dialog.confirm({
						content: 'hello'
					});
				}
			</script>
		</div>
		<div class="page-example">
			<button type="button" class="btn btn-primary" onclick="showIframe()">
				iframe 对话框
			</button>
			<div class="mt12">
				<textarea class="form-control" name="pageResult" id="pageResult" rows="2" placeholder="表单提交内容"></textarea>
			</div>
			<script>
				var showIframe = function() {
					var d = boNiu.Dialog.page({
						title: '表单',
						url: './dialog-form.html',
						height: 300,
						pageOk: function(pageWin) {
							var p$ = pageWin.jQuery;
							console.log(p$('#pageForm').serialize());
							$('#pageResult').val(p$('#pageForm').serialize());
							d.close();
						},
						pageCancel: function() {
							d.close();
						}
					});
				}
			</script>
		</div>
	</div>
	<script src="assets/js/libs/bootstrap.min.js"></script>
	<script src="assets/js/libs/sly.min.js"></script>
	<script src="assets/js/libs/dialog.min.js"></script>
	<script src="assets/js/boniu.common.js"></script>
</body>
</html>